package cn.simonfish.carrier.common.web;

import javax.servlet.http.HttpSession;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by simon on 2017/9/20.
 */
public class SessionMap {

    private static final Map<String,HttpSession> sessions = new HashMap();


    public static void register(HttpSession httpSession){
        sessions.put(httpSession.getId(),httpSession);
    }

    public static HttpSession get(String id) {
        return sessions.get(id);
    }

    public static void release(String id) {
        sessions.remove(id);
    }



}
